package com.hqyj.service.impl;

import com.hqyj.dao.UserInfoMapper;
import com.hqyj.pojo.UserInfo;
import com.hqyj.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@Service
public class UserInfoServiceImpl implements UserInfoService {
    //注入dao层
    @Autowired(required = false)
    UserInfoMapper userInfoMapper;

    @Override
    public HashMap<String, Object> select() {
       List<UserInfo> list = userInfoMapper.select();
        HashMap<String, Object> map = new HashMap<String, Object>();
        map.put("userList",list);
        return map;
    }

    @Override
    public List<UserInfo> get() {
        List<UserInfo> userInfos = userInfoMapper.select();
        return userInfos;
    }
}
